TARGET = proxy2ch.exe
SOURCES = main.cpp BBS2chProxyConnection.cpp BBS2chProxyAuth.cpp hmac.c stringEncodingConverter.c BBS2chProxyRawSocket.cpp BBS2chProxySecureSocket.cpp BBS2chProxyHttpHeaders.cpp BBS2chProxyURL.cpp BBS2chProxyKeyManager.cpp BBS2chProxyBoardManager.cpp BBS2chProxyHTML2Dat.cpp BBS2chProxyFormData.cpp BBS2chProxyPoster.cpp utils.cpp parson/parson.c
OBJS = $(SOURCES:.cpp=.o)
OBJS := $(OBJS:.c=.o)

CFLAGS = -O2

.PHONY: all
all : $(TARGET)
$(TARGET) : $(OBJS)
	$(CXX) $^ -o $(TARGET) -static-libgcc -static-libstdc++ -lcurldll -lpthread -lwsock32 -lws2_32 -lregex

.cpp.o:
	$(CXX) $(CFLAGS) -c -o $@ $<

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<

.PHONY: depend
depend:
	$(CXX) -MM $(CFLAGS) $(SOURCES) > dependencies

.PHONY: clean
clean :
	rm -f $(OBJS) $(TARGET)

include dependencies
